#{extends 'include/base.html' /}
#{set title:'活动' /}
<div class="slider">
    <div id='mySwipe' style='width:100%;margin:0 auto' class='swipe'>
        <div class='swipe-wrap'>
        #{if list}
            #{list items:list,as :'item'}
                <div><a href="${item.keyId}"><img src="${item.imageurl}" alt=""/></a></div>
            #{/list}
        #{/if}
        </div>
    </div>
</div>
#{list items:activityList,as :'item'}
<div class="activity_item">
    <div class="activity_left">
        <div class="activity_left_top"></div>
        <p class="activity_time">${new Date(item.time).format('yyyy/MM/dd')}</p>
        <div class="activity_left_bottom"></div>
    </div>
    <div class="activity_right">
        <a href="@{Application.activityItem(item.id)}"><p class="activity_title">${item.name}</p></a>
        <a href="@{Application.activityItem(item.id)}"><img src="${item.imageurl}" alt="" class="activity_img"/></a>
    </div>
</div>
#{/list}
<div class="red_ball_wrap">
    <div class="red_ball"></div>
</div>
<script src="@{'/public/javascripts/swipe.js'}" type="text/javascript"></script>
<script type="text/javascript">
    var elem = document.getElementById('mySwipe');
    window.mySwipe = Swipe(elem, {
        // startSlide: 4,
        auto: 3000
        // continuous: true,
        // disableScroll: true,
        // stopPropagation: true,
        // callback: function(index, element) {},
        // transitionEnd: function(index, element) {}
    });
</script>
